require("module-alias/register");
require("dotenv").config();
const Koa = require("koa");




const InitManager = require("./core/init");
const parser = require("koa-bodyparser");
const catchError = require("./middlewares/exception");
const staticResource = require("koa-static");
const path = require("path");

const app = new Koa();

app.use(catchError);
app.use(parser());
app.use(staticResource(path.join(__dirname, "doc")));
// app.use(staticResource(path.join(__dirname, "dist")));
app.use(staticResource(path.join(__dirname, "static")));
InitManager.initCore(app);




app.listen(3000);
// https.createServer(credentials, app.callback()).listen(3000);
